/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package slcu.service.persistence;

import com.liferay.portal.service.persistence.BasePersistence;

import slcu.model.Escuela;

/**
 * The persistence interface for the Escuela service.
 *
 * <p>
 * Caching information and settings can be found in <code>portal.properties</code>
 * </p>
 *
 * @author tito
 * @see EscuelaPersistenceImpl
 * @see EscuelaUtil
 * @generated
 */
public interface EscuelaPersistence extends BasePersistence<Escuela> {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link EscuelaUtil} to access the Escuela persistence. Modify <code>service.xml</code> and rerun ServiceBuilder to regenerate this interface.
	 */

	/**
	* Caches the Escuela in the entity cache if it is enabled.
	*
	* @param escuela the Escuela
	*/
	public void cacheResult(slcu.model.Escuela escuela);

	/**
	* Caches the Escuelas in the entity cache if it is enabled.
	*
	* @param escuelas the Escuelas
	*/
	public void cacheResult(java.util.List<slcu.model.Escuela> escuelas);

	/**
	* Creates a new Escuela with the primary key. Does not add the Escuela to the database.
	*
	* @param escuelaId the primary key for the new Escuela
	* @return the new Escuela
	*/
	public slcu.model.Escuela create(long escuelaId);

	/**
	* Removes the Escuela with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param escuelaId the primary key of the Escuela
	* @return the Escuela that was removed
	* @throws slcu.NoSuchEscuelaException if a Escuela with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela remove(long escuelaId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchEscuelaException;

	public slcu.model.Escuela updateImpl(slcu.model.Escuela escuela,
		boolean merge)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the Escuela with the primary key or throws a {@link slcu.NoSuchEscuelaException} if it could not be found.
	*
	* @param escuelaId the primary key of the Escuela
	* @return the Escuela
	* @throws slcu.NoSuchEscuelaException if a Escuela with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela findByPrimaryKey(long escuelaId)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchEscuelaException;

	/**
	* Returns the Escuela with the primary key or returns <code>null</code> if it could not be found.
	*
	* @param escuelaId the primary key of the Escuela
	* @return the Escuela, or <code>null</code> if a Escuela with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela fetchByPrimaryKey(long escuelaId)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the Escuelas where region = &#63;.
	*
	* @param region the region
	* @return the matching Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findByRegion(
		java.lang.String region)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the Escuelas where region = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param region the region
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @return the range of matching Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findByRegion(
		java.lang.String region, int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the Escuelas where region = &#63;.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param region the region
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of matching Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findByRegion(
		java.lang.String region, int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the first Escuela in the ordered set where region = &#63;.
	*
	* @param region the region
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Escuela
	* @throws slcu.NoSuchEscuelaException if a matching Escuela could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela findByRegion_First(java.lang.String region,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchEscuelaException;

	/**
	* Returns the first Escuela in the ordered set where region = &#63;.
	*
	* @param region the region
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the first matching Escuela, or <code>null</code> if a matching Escuela could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela fetchByRegion_First(java.lang.String region,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the last Escuela in the ordered set where region = &#63;.
	*
	* @param region the region
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Escuela
	* @throws slcu.NoSuchEscuelaException if a matching Escuela could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela findByRegion_Last(java.lang.String region,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchEscuelaException;

	/**
	* Returns the last Escuela in the ordered set where region = &#63;.
	*
	* @param region the region
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the last matching Escuela, or <code>null</code> if a matching Escuela could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela fetchByRegion_Last(java.lang.String region,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the Escuelas before and after the current Escuela in the ordered set where region = &#63;.
	*
	* @param escuelaId the primary key of the current Escuela
	* @param region the region
	* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
	* @return the previous, current, and next Escuela
	* @throws slcu.NoSuchEscuelaException if a Escuela with the primary key could not be found
	* @throws SystemException if a system exception occurred
	*/
	public slcu.model.Escuela[] findByRegion_PrevAndNext(long escuelaId,
		java.lang.String region,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException,
			slcu.NoSuchEscuelaException;

	/**
	* Returns all the Escuelas.
	*
	* @return the Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the Escuelas.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @return the range of Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findAll(int start, int end)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the Escuelas.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Escuela> findAll(int start, int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the Escuelas where region = &#63; from the database.
	*
	* @param region the region
	* @throws SystemException if a system exception occurred
	*/
	public void removeByRegion(java.lang.String region)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Removes all the Escuelas from the database.
	*
	* @throws SystemException if a system exception occurred
	*/
	public void removeAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of Escuelas where region = &#63;.
	*
	* @param region the region
	* @return the number of matching Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public int countByRegion(java.lang.String region)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of Escuelas.
	*
	* @return the number of Escuelas
	* @throws SystemException if a system exception occurred
	*/
	public int countAll()
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns all the Directors associated with the Escuela.
	*
	* @param pk the primary key of the Escuela
	* @return the Directors associated with the Escuela
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> getDirectors(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns a range of all the Directors associated with the Escuela.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the Escuela
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @return the range of Directors associated with the Escuela
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> getDirectors(long pk, int start,
		int end) throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns an ordered range of all the Directors associated with the Escuela.
	*
	* <p>
	* Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
	* </p>
	*
	* @param pk the primary key of the Escuela
	* @param start the lower bound of the range of Escuelas
	* @param end the upper bound of the range of Escuelas (not inclusive)
	* @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
	* @return the ordered range of Directors associated with the Escuela
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List<slcu.model.Director> getDirectors(long pk, int start,
		int end,
		com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the number of Directors associated with the Escuela.
	*
	* @param pk the primary key of the Escuela
	* @return the number of Directors associated with the Escuela
	* @throws SystemException if a system exception occurred
	*/
	public int getDirectorsSize(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the Director is associated with the Escuela.
	*
	* @param pk the primary key of the Escuela
	* @param directorPK the primary key of the Director
	* @return <code>true</code> if the Director is associated with the Escuela; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsDirector(long pk, long directorPK)
		throws com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns <code>true</code> if the Escuela has any Directors associated with it.
	*
	* @param pk the primary key of the Escuela to check for associations with Directors
	* @return <code>true</code> if the Escuela has any Directors associated with it; <code>false</code> otherwise
	* @throws SystemException if a system exception occurred
	*/
	public boolean containsDirectors(long pk)
		throws com.liferay.portal.kernel.exception.SystemException;
}